package com.flower.oauth2.controller;

import com.flower.oauth2.entity.SysUser;
import com.flower.oauth2.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/test/")
public class TestTokenController {

    @Autowired
    private SysUserService sysUserService;

    @RequestMapping("user")
    @ResponseBody
    public SysUser getSingleUser(String username){
        SysUser sysUser = sysUserService.getSingleUser(username);
        return sysUser;
    }
}
